Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add docker-compose file #174

Merged
merged 2 commits into from
Dec 13, 2023

Conversation

eerison
Copy link
Contributor

@eerison eerison commented Nov 19, 2023

  • Add docker-compose.yml file
  • Add docker commands into the README.md file

Close #172

- Add `docker-compose.yml` file
- Add docker commands into the README.md file

Close satnaing#172
@satnaing
Copy link
Owner

I can't run the app without running docker compose run app npm install. Then node_modules will appear in my local machine.
Can you tell me some steps to run docker-compose file?

Docker is not my area of expertise, and thus you can tell me if I'm wrong.
Here are my steps

  1. install dependencies with docker compose run app npm i
  2. run docker-compose with docker compose up -d

@eerison
Copy link
Contributor Author

eerison commented Dec 12, 2023

Hey @satnaing

just to make sure do you have docker locally?

just to make sure run

docker compose version  
# Docker Compose version v2.23.0-desktop.1

if you could see the version, then you should run the steps that you said above

install dependencies with docker compose run app npm i
run docker-compose with docker compose up -d

if it is not working what error appear for you?

@satnaing
Copy link
Owner

@eerison
Yep, I went through those steps.
One thing I'm confused is that node_modules still need to be in my local environment.

So, here's what I do.

  1. delete node_modules from my local
  2. docker compose run app npm i
  3. docker compose up -d

When I did step 2, node_modules appeared in my local.
Is it what is supposed to be? Juz curious!

@eerison
Copy link
Contributor Author

eerison commented Dec 13, 2023

Is it what is supposed to be? Juz curious!

Yep it is expected, because when something is updated into de container, it is binding to your machine, and also the other way around, if you updated something, it will appear into the container.

But the question is , did it work?

If not there are few things we could check

docker compose logs
docker compose ps (here you should see the container up, If it isn't up, maybe you have something running on port 4321)

@satnaing
Copy link
Owner

Oh okay.
Everything works fine.
I just wanted to know this 👇🏻

When I did step 2, node_modules appeared in my local.
Is it what is supposed to be?

I'll make small adjustments in README and merge this PR.
Thanks for your contribution.

@satnaing satnaing merged commit fb3fa98 into satnaing:main Dec 13, 2023
@eerison eerison deleted the feature/add-docker-compose-file branch December 13, 2023 08:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create a default docker compose configuration
2 participants